/*
 * controller.h
 *
 *  Created on: Dec 11, 2012
 *      Author: michiel
 */

#ifndef CONTROLLER_H_
#define CONTROLLER_H_

#include <ros/ros.h>
#include <ar_pose/ARMarkers.h>

#include "topic/topic.h"
#include "navigation/motionMsg.h"

class Controller {
	protected:
		ros::NodeHandle nh_;
		ros::Subscriber marker_sub_;
		ros::Publisher engine_pub_;
		ros::Time time_;

		double xpos_, zpos_;

		void markerCallback(const ar_pose::ARMarkers::ConstPtr &msg);
	public:
		Controller() : nh_("~") {
			init();
			time_ = ros::Time::now();
		}
		~Controller() {
			nh_.shutdown();
		}
		void init();
		void spin();
};


#endif /* CONTROLLER_H_ */
